import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const USER: AppRouteRecordRaw = {
    path: '/monitor',
    name: 'monitor',
    component: DEFAULT_LAYOUT,
    meta: {
        locale: 'menu.monitor',
        icon: 'icon-storage',
        requiresAuth: true,
        order: 2,
    },
    children: [
        {
            path: '/monitor/big-screen',
            name: 'monitor-big-screen',
            component: () => import('@/views/monitor/bigscreen/index.vue'),
            meta: {
                locale: 'menu.monitor',
                requiresAuth: true,
                roles: ['*'],
            },
        },
        {
            path: '/device',
            name: 'device',
            component: () => import('@/views/monitor/device/index.vue'),
            meta: {
                locale: 'menu.monitor',
                requiresAuth: true,
                roles: ['*'],
            },
        },
        {
            path: '/device/detail',
            name: 'device-detail',
            component: () => import('@/views/monitor/device/detail.vue'),
            meta: {
                // locale: 'menu.monitor',
                requiresAuth: true,
                roles: ['*'],
                hideInMenu: true,
            },
        },
        {
            path: '/alert',
            name: 'device-alert',
            component: () => import('@/views/monitor/alert/index.vue'),
            meta: {
                locale: 'menu.monitor',
                requiresAuth: true,
                roles: ['*'],
            },
        },
    ],
};

export default USER;
